<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
</head>
<script src="vue.js"></script>


<body>

    <div id="app">
        <bs-panel :data="news">
            <template scope="v">
                <li><h1>{{v.field.title}}</h1></li>
            </template>
        </bs-panel>
    </div>

<script type="text/x-template" id="bsPanel">
    <ul>
        <!--<li v-for="v in data">{{v.title}}</li>-->
        <!--<slot title="java" na="ew"></slot>-->
        <slot v-for="v in data" :field="v"></slot>
    </ul>

</script>
<script>

    var bsPanel={
        template:'#bsPanel',
        props:['data'],
        data(){
            return{
                
            };

        },
        methods:{
            del(k){
                this.news.splice(k,1);
            }
        }
    };
    var app=new Vue({
        el:'#app',
        components:{
            bsPanel
        },
        data: {
            news:[
                {title:'你好！'},
                {title:'你好2！'}

            ]


        },



    });

</script>
</body>
</html>